package com.kun.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;


@Getter
@Setter
@ToString
@NoArgsConstructor
@TableName(value = "trade_user_money_log")
public class TradeUserMoneyLog {
    /**
     * 用户ID
     */
    @NotNull(message = "请求参数不合法")
    private Long userId;

    /**
     * 订单ID
     */
    @NotNull(message = "请求参数不合法")
    private Long orderId;

    /**
     * 日志类型 1订单付款 2 订单退款
     */
    private Integer moneyLogType;

    /**
     * 用户余额
     */
    @NotNull(message = "请求参数不合法")
    private BigDecimal useMoney;

    /**
     * 日志时间
     */
    private Date createTime;

    public TradeUserMoneyLog(Long userId, Long orderId, Integer moneyLogType, BigDecimal useMoney) {
        this.userId = userId;
        this.orderId = orderId;
        this.moneyLogType = moneyLogType;
        this.useMoney = useMoney;
    }
}
